from django.contrib import admin
from news.models import NewsCategory, News
# edit view admin
class NewsCategoryAdmin(admin.ModelAdmin):
        search_fields = ['title']
        list_display = ('name','create')

class NewsAdmin(admin.ModelAdmin):
    search_fields = ['title']
    list_filter = ('category','status')
    list_display = ('title','create_date','category')



# register function
admin.site.register(NewsCategory, NewsCategoryAdmin)
admin.site.register(News, NewsAdmin)


